home *** CD-ROM | disk | FTP | other *** search
- im24.doc
- --------
-
- official documentation to the graphic tool
- ------------------------------------------
- ImageEditor v2.4
- ----------------
-
- 1.Function
- ----------
-
- This program is thought for programmers interested in computer graphics.
- It allows you to design pictures which you can use in your own programs.
-
- Just draw your picture, and when you are ready select the gadget disk
- (or press the key d) and on the new window the gadget asm image (or the
- key a) if you are programming in assembler or c image (or the key c) if
- you favourite language is c and then type in your wished file name and
- Return and your artwork will be saved as source code.
-
- This is the philosophy of this program: simple usage with as certain as
- possible function. Another principle by writing of this program was
- small usage of memory.
-
- To the usage: all functions can be activated by klicking on a gadget,
- most of them also by a keystroke (exceptions: info-function, closing
- of some windows); the key to activate a gadget is displayed on this
- gadget; most functions open further windows, which can be closed by
- typing 'q' (you can also leave the program by typing 'q' and then 'o').
-
- To the function: I don't know any way to get a guru out of this program,
- if any function can't get the memory it needs, you will see a alert
- and can continue the program after clicking with the left mouse button,
- the actual function will be aborted; another aspect is, that this pro-
- gram doesn't use any illegal tricks (as direct access to the custom-
- chip-registers).
-
- To the memory usage: the program uses about 132K of memory (76K chip)
- as standard (when you started it), functions which need more memory
- (e.g. iff loading) allocate it dynamically; you have a special option:
- the program can be iconified, then you can work with other programs and
- im24 uses only about 60K (6K chip) of memory. Just activate the iconi-
- fied window and push the right mouse button to 'uniconify' it.
-
- 2.Information
- -------------
-
- This program allows you to draw pictures up to 166*58 in hires-mode and
- up to 83*58 in lores-mode. The difference between this two modes is, that
- pixels in lores-(or normal-)mode are twice as width as in hires-mode.
- The start-mode is hires. The mode and the picture width and height are
- set in the pref(erence)s-part, the minimal width/height value is 1.
- You draw always in the 16-color-mode, but the save- and load-functions
- can also handle less than 16 colors (the number of colors is set in the
- disk-part because it is only important for disk operations). If you know
- an iff-file with the palette you want to use, you can also load only the
- palette from this file, without changing your picture.
-
- © 1990 by Robert Junghans
- written with Aztec-C v3.6a
-
- This program is shareware, so if you use it please send $5.00 to:
- Robert Junghans, Agnes Straub Weg 10, 1000 Berlin 47, West Germany.
-
- Improvement suggestions and any other form
- of constructive criticism welcome.
-
- This version consists of: the executable program im24, the source code
- im24.c and the documentation file im24.doc. An example picture named
- pic1.ilbm (width:128, height:58, depth:3) is also included.
- The source code is about 80K (about 2700 lines, 43 functions), the exe-
- cutable length is about 35K. Every function in im24.c is described
- short. If you nevertheless will have questions, write me (address above).
-
- When you want to compile this program, you should have a precompiled
- file which contains all amiga-dos-includes (those files in directories,
- not e.g. functions.h).
-
- When you do not have such a file, make the following: write a file which
- only contains #include-instructions and make sure to include all files
- in the directories in your include-directory (example line: #include
- <intuition/intuitionbase.h> (Return)). Then compile this file by typing
- the following instructions in your cli:
-
- cc all.c -a +hall.pre
- delete all.asm
-
- Now you will have this precompiled file named all.pre which our next
- step will require. To compile the program, type this commands:
-
- cc im24 -e360 +iall.pre
- ln im24 -lc
- delete im24.o
-
- .. and if your computer will not response with 'error: too many gotos in
- program', you should have the executable in your actual directory.
-
- When you give this program away, please be sure to give all original
- files away and not only some parts of this package.
-
- 3.Description
- -------------
-
- To start the program, type im24 and Return in an Cli-window. To quit it,
- type 'q' or click on the close-gadget of the draw-window, then a re-
- quester will apear and ask you if you are sure to quit the program. Then
- click on the o.k.-gadget or type 'o' to quit or click on the cancel-
- gadget to continue (typing of a letter different from 'o' will also
- cause a 'cancel').
-
- In the draw-window you will see the bordered draw-area on the left side,
- the color-gadgets right and the function-gadgets on the very right side.
-
- The two actual colors (for the left and the right mouse button) are
- marked with two arrows left and right the color-gadgets. To change any
- color, just click on the (bordered) color-gadget with the wished mouse
- button (the according arrow will move to 'your' color).
-
- Now I come to the description of the 8 function-gadgets right: the first
- 4 gadgets are executed immediately, the last 4 are opening windows with
- further gadgets. Here the first 4 gadgets and their meaning:
-
- keystroke/name description
- -------------- -----------
- i / icon If you don't want to use ImageEditor now but you will
- start programs requiring memory you must not quit
- ImageEditor. Just click on that gadget and the screen
- will be closed and ImageEditor will open a window on the
- Workbench screen. This window has a close-gadget, the
- depth gadgets and a drag bar. You can quit the program
- now on the same way as from the draw-window, furthermore
- you can get back the full ImageEditor-screen with your
- old picture by clicking with the right (menu-) mouse
- button (be sure that the window is active).
- Remark: you will lose the undo-picture.
- / info A info-window with some informations to the program will
- be opened. To leave this window push the o.k.-gadget.
- f / flood After activating of this gadget it will be inverted to
- show you that this function is active. To disactivate it
- press the key 'f' or the flood-gadget once again.
- To flood a cohering area click over this area with the
- wished mouse button (to select a color to fill).
- u / undo When you click on this gadget your last function will be
- 'taken back'. Examples for functions: drawing, flooding,
- clearing of the whole area. If you changed the size of
- your picture (in pref(erence)s) and lost so your picture,
- you have to set up your old picture size and then activa-
- te the undo-function and you will get your old picture
- back.
-
- The next gadget is the disk-gadget (keystroke: 'd'). Here the functions:
-
- keystroke/name description
- -------------- -----------
- 1 / plane (see below)
- 2 / planes (see below)
- 3 / planes (see below)
- 4 / planes By clicking on these gadgets you choose the number of
- bitmaps to be loaded and saved by disk operations.
- p / ilbm pal If you know an iff-(ilbm-)file with the palette you want
- to use, you can load only the palette from this file
- without changing your picture (except of the colors).
- After activating this gadget another window will be
- opened and ask you for a file name (the extension '.ilbm'
- will be added). Type in your wished filename and hit
- Return or the o.k.-gadget to load the palette or cancel
- to abort the function (this is one of the windows you
- can't decide to cancel with only a keystroke, because the
- string-gadget is activated when the window is opened).
- l / ilbm Loading of an ilbm-file. You will see the same name-gad-
- get as in 'ilbm pal' and have the same ways to load or
- abort. You can load only files which have the same size
- and depth as actually set; if you should forget it, the
- program will remember you of this fact (it's surely not
- the best way (e.g. when you want to transform pictures),
- write me if you want to have this load/save-functions
- extended). Extension '.ilbm' will be added.
- s / ilbm First of all the same file-name-window. Same extension
- ('.ilbm') will be added. This function will save your
- actual picture to the file you wish.
- a / image asm You will be asked for the name of the source file. The
- extension '.asm' will be added. This function will save
- the computed words as simple dc.w(s) and an Image-struc-
- ture additional to the word-field. The computing and
- saving routines could be surely made faster what I plan
- for the next update (the same to the save-c-routines).
- c / image c This function is like the 'image asm'-function with the
- only difference that c-source-code is generated. The
- datas are seved as USHORTs with an Image-structure
- following. The extension '.c' is added.
- / sprite asm This and the following gadget will only appear if your
- width is 16 and your planes-value 2. This function will
- ask you for a name (what else?) and then save the datas
- in the sprite-format and a SimpleSprite-structure follo-
- wing. Extension added: '.asm'.
- / sprite c Saving of a data-field (as UWORDs) and a (naturally
- full initialized) SimpleSprite-structure in an file with
- the wished name with the automatically added extension
- '.c'.
-
- To quit this or any other of the last-4-gadget-windows you can either
- click on the close-gadget of the corresponding window or hit the key 'q'.
-
- The next gadget is the colors-gadget (keystroke: 'c'). On the right side
- you can see 3 proportional-gadgets which display the red, green and the
- blue part of the current color. The current color is the 'left' color,
- i.e. the color with the arrow left. Right from these proportional gadgets
- are shown the values of the prop-gadget (hexadezimal: '0' to 'f').
- With these 3 prop-gadgets you can change the actual color.
-
- This function has also two special keystrokes: 'n' and 'b', what means
- (n)ext and (b)ack. When you type one of these keys, the actual color will
- increase or decrease by 1.
-
- On the left side of the window you will find also these 3 gadgets:
-
- keystroke/name description
- -------------- -----------
- / o.k. Leaving of the colors-part with the colors you just set.
- Use this gadget after designing a new color palette.
- / cancel Leaving the colors-part with the colors which were set
- before you came to the colors-part (when you enter the
- color-function, your actual palette is saved).
- / reset Leaving of this function with the same palette as if you
- will just have started the program (the default palette).
-
- When you click on the close-gadget of the colors-window or type 'q' this
- will be the same as if you have leaved the colors-function with 'cancel'.
-
- The gadget below the colors-gadget is named prefs and have the key 'p'.
- In the now opened window you can see the actual mode (hires or normal),
- picture width and picture height. While changing the mode you will see
- that the picture width will also be changed.
-
- When you click on the o.k.-gadget your old picture will be deleted (not
- the undo-picture) and a new border around the draw-area will be drawed.
-
- Clicking on the cancel-gadget or the close-gadget of the window or typing
- 'q' will close the pref(erence)s-window without changing anything.
-
- The last gadget is named 'extras' and contains everything I couldn't put
- in one of the other 3 window-functions. The keystroke is naturally 'e'.
- Extras offers you the following functions:
-
- keystroke/name description
- -------------- -----------
- s / show This function will open a small window with the picture
- in the original size. You don't have to close this window
- to continue, all functions will work also when this
- function is 'active'.
- When only the draw-window and the show-window are open
- (and no of the 4-last-gadget-windows) and you type 'q',
- then you won't get the request if you want to quit the
- program, but this show-window will be closed (you can
- close this window also by clicking on this close-gadget
- (but not when another function (even extras) is active)).
- c / clear This function will fill the whole draw-area with the
- (left-)active color. When you clear by mistake, remember
- the undo-function.
- h / flip h When you activate this function your picture will be
- flipped horizonthal (old left side is new right side).
- v / flip v This function is very similar to 'flip h' with the
- difference that it is flipping vertical (your picture
- will be upside down after usage of this function).
- u / up1 (see below)
- / up2 (see below)
- / up3 (see below)
- d / down1 (see below)
- / down2 (see below)
- / down3 (see below)
- r / right1 (see below)
- / right2 (see below)
- / right3 (see below)
- l / left1 (see below)
- / left2 (see below)
- / left3 These functions will move your picture 1, 2 or 3 pixels
- up, down, to the right or to the left.
-
- End of the documentation.
-